home *** CD-ROM | disk | FTP | other *** search
/ Precision Software Appli…tions Silver Collection 1 / Precision Software Applications Silver Collection Volume One (PSM) (1993).iso / windows / games / circlesq.arj / CIRCLSQ3.DOC < prev    next >
Text File  |  1987-09-09  |  9KB  |  154 lines

  1.  
  2. CIRCLESQ.EXE -- "Pretty Wallpaper" program for Microsoft (tm) Windows
  3.         (c) Copyright 1987 -- Doren Kim Levitt
  4.             Version 3.00 -- 9/9/1987
  5.  
  6. (Based on an algorithm devised by John E. Connett of University of
  7. Minnesota as published in Scientific American - September 1986)
  8.  
  9. This program is a little something I whipped up to test Windows' device
  10. independence and also to get a handle (he he) on learning to do bit
  11. map graphics under Windows.. 
  12.  
  13. When I did the original version for Windows v1.03, I got a rude awakening
  14. when I discovered that although I could use a "memory bitmap" to contain
  15. a copy of a full screen display for a monochrome screen, on the color
  16. version it produced garbage when a bitblt was attempted.. After reading
  17. of the limitations of EGA and other color systems under Windows v1.03, I
  18. decided to postpone the problem until Windows 2.00 when it would hopefully
  19. be fixed. So I put in a "kludge" that precluded the use of a memory bitmap
  20. with color systems.. This meant that any window resizing or repainting re-
  21. quired a recomputation of the screen values..
  22.  
  23. Now that Windows v2.00 is coming out (any day now), the good news is they
  24. fixed the bugs! Now you can have full-screen memory bitmaps and there is
  25. also support for 8087 use. My new version (3.00) of CIRCLESQ uses both of
  26. these new features and therefore works a lot better than the old one.
  27.  
  28. In a future version, I plan on implementing a "File" menu with functions
  29. to permit reading of pre-computed arrays of data and also writing of
  30. arrays after computation to memory and disk.
  31.  
  32. NOTE that the earlier version for Windows v1.03 is named CIRCLSQ2.EXE.
  33. You can run this one under Windows v1.0x or Windows v2.00, but it doesn't
  34. have the "Edit" menu functions implemented and in the color version, the
  35. window cannot be resized or repainted without causing a re-computation of
  36. the entire screen. The new version, (named CIRCLSQ3.EXE) is for Windows
  37. v2.00 and up systems ONLY. Do NOT attempt to run it on earlier versions
  38. of Windows, it will CRASH your system.
  39.  
  40. The CIRCLSQ2 version has a few known "bugs" (and probably lots more I
  41. haven't found yet):
  42.  
  43.     1) You cannot bring up the "About..." or "Setup" dialog boxes
  44.        during a screen painting. (If you attempt this, the dialog
  45.        box will not appear until the screen is completely plotted.)
  46.        On color systems, if a portion of the window that has been
  47.        painted is covered by a dialog box or popup windows, when the
  48.        dialog box or popup goes away, a hole will be left.. Part of
  49.        this is due to the "kludge". (It's fixed in the new version.)
  50.  
  51.     2) The window caption bar will appear on a window in full screen
  52.        mode that has been "de-zoomed" and has been "Alt-tabbed" or
  53.        "clicked in" as an "active" task after running as an "inactive"
  54.        task. (This is because Windows insists on updating the caption
  55.        bar even when "full-screen" mode is enabled.) Since normally
  56.        full screen mode isn't used when a window is tiled, this is
  57.        not usually a problem.. (A "full-screen" mode tiled window is
  58.        kind of interesting, however.. You can tile a screen with a
  59.        bunch of "full-screen" windows and get interesting effects..
  60.        See my "Flasher" program for another Windows application that
  61.        uses "full-screen" mode.) (This problem is fixed somewhat
  62.        better in the new version, but under some cases, you can get
  63.        the frame drawn in there and the program will paint over it.)
  64.  
  65.     3) It's SLOW (8087 support helps a lot here, it's not possible
  66.        under Windows v1.0x, upgrade to Windows v2.00 and run the
  67.        new version which DOES use the 8087.)
  68.  
  69.     4) The "Edit" menu is non-functional. (It's implemented in the
  70.        new version.)
  71.  
  72. The new version (CIRCLSQ3) has no known bugs. (Let me know if you find
  73. any...) There are two limitations, however: When using the "Edit" function
  74. in full-screen mode, you cannot "Mark" any "non-client" areas of the
  75. window (the invisible border, menu bar, title bar, control menu box and
  76. sizing boxes) even though there are painted. Switch out of full screen
  77. mode and the image will move into the client area. Also, when you are
  78. "Marking" an area of the screen, once you have pressed the button, you
  79. are "locked" into the client area (until you release the mouse button).
  80. If you use the keyboard to move or iconize the window, your cursor may
  81. remain trapped. Move the window back (using the keyboard if necessary)
  82. and then click the mouse button and you will be freed. (I might have been
  83. able to put in a trap for this kind of move, but no normal human would
  84. ever try such a thing, right? Only a mad programmer bent on finding a
  85. bug... So I will classify this as a FEATURE, not a bug...)
  86.  
  87. Note that when using the "Full Screen" mode, the drop down menus can
  88. still be accessed either with the mouse (if you point and click in the
  89. right spot) or via function keys.. (Neat huh?)
  90.  
  91. The new version of CIRCLESQ also demonstrates the new 8087 and large
  92. bitmap support under Windows v2.00. They finally fixed the memory
  93. bitmaps to permit memory storage of large color bitmaps. This allows
  94. the Windows v2.00 version to save the entire screen image in memory
  95. so the window can be re-sized or moved without required a recomputation
  96. of screen pixel color values. Unfortunately, the memory required to
  97. save a full-color, full-screen image is quite a bit, so CIRCLSQ3 is
  98. a memory pig.. Under Windows v2.00, however, if you have "EMS" or
  99. "EEMS" expanded memory in your system (or extended emulating expanded)
  100. you can get a "EMS v4.0" driver for your board and Windows will use
  101. the extra memory. It comes in handy for programs like this.
  102.  
  103. If your system has an 8087 or 80287 or 80387, when you run the new
  104. version, CIRCLSQ3 will use it to speed calculations. Whether you have
  105. one or not, CIRCLSQ3 will cause Windows to look for a WIN87EM.EXE file,
  106. which should be in your Windows directory or on the search path.
  107.  
  108.  
  109. Since this program computes a value for each pixel it is VERY VERY SLOW...
  110. Plan on drinking coffee while it runs. If you have patience, however,
  111. this program will produce some very colorful and beautiful pictures..
  112. Try the default values to start and then move the viewport size up and
  113. down as you wish.. (If you have a few hours to kill or a 386/80387.)
  114.  
  115. To use the "Edit" menu functions, select "Mark", then move the cursor
  116. over the screen, click at one of the corners of a rectangle you wish to
  117. cut and then drag the mouse (with the button depressed) to an opposite
  118. corner and release the button. The area you select will be displayed in
  119. reverse colors. You can then use the "Copy" option to copy the selected
  120. section of the display to the clipboard. It will show up there as a
  121. color bitmap. You can then paste the image from the clipboard, but in
  122. Windows Write and Paint, the color bitmap is converted to monochrome.
  123. Windows Draw! and In-A-Vision don't support color bitmaps (they are
  124. metafile editors), but PC Paintbrush for Windows WILL support color
  125. bitmaps.
  126.  
  127. This program uses GetDeviceCaps calls to determine the resolution and
  128. number of colors on your display and uses this information in plotting
  129. the pixels on the screen.. Read the Scientific American article for
  130. info on the algorithm used to plot.
  131.  
  132. I would appreciate any feedback. Let me know if you liked it or not or
  133. what you would like to see changed or if you found any interesting bugs..
  134. I may release the source later if anyone is interested and after I clean
  135. it up some.. I originally wrote this program in Turbo Pascal, by the way,
  136. then translated to "plain-vanilla" C (under DOS) then to Windows v1.00 and
  137. now to Windows v2.00.. It may not be a very useful program, but it is
  138. "pretty" and it has (and still is) providing me with a good program to
  139. "play with" so I can learn how to write for Windows. I could probably keep
  140. adding features until I have tried everything in the book.. (he he)..
  141.  
  142. If you liked this program so much you'd like to send a donation to me,
  143. that would be nifty.. (Make checks payable to: Micro Bulletin Board
  144. Systems and send to: MBBS; 8033 Sunset Blvd., #975; Los Angeles, CA 90046)
  145. You can address feedback to me via my BBS system (number below). Leave a
  146. message on log off using "COMMENTS" at the CP/M prompt (yes, CP/M still
  147. lives).. (My MBBS runs on an old Kaypro II Z80/ZCPR3 based system. I
  148. use an AT&T PC6300 for development work.)
  149.  
  150.                     -- Kim Levitt, sysop
  151.                        MBBS HQ PDSE
  152.                        (213) 653-6398 (300/1200/2400)
  153.                        (24 hrs, 7 days/week BBS system)
  154.